00001 /////////////////////////////////////////////////////////////////////////////// 00002 /// @file deLine.hpp 00003 /// 00004 /// @brief Mathematical Line Representations 00005 /// 00006 /// @author Assassin 00007 /// 00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the 00009 /// contents of this file is subject to the Destiny3D Member License which 00010 /// can be found at http://www.destiny3d.com. Any other usage is prohibited. 00011 /// 00012 /// This file is distributed "AS IS" without warranty of any kind. Novus 00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file 00014 /// for any particular purpose. 00015 /// 00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved. 00017 /// 00018 /// <hr> 00019 /// Change History 00020 /// <hr> 00021 /// 00022 /// @date Nov 2001 00023 /// @author Assassin 00024 /// @remarks Creation 00025 /// 00026 /////////////////////////////////////////////////////////////////////////////// 00027 00028 #ifndef DELINE_HPP 00029 #define DELINE_HPP 00030 00031 #include "deGlobalTypes.hpp" 00032 #include "deArray.hpp" 00033 #include "deMath.hpp" 00034 #include "deBrush.hpp" 00035 00036 class IdeLine; 00037 class IdeSplinePatch; 00038 00039 // factory functions 00040 DEBRUSH_API IdeLine * IdeLine_CreateStraightLine(); 00041 DEBRUSH_API IdeLine * IdeLine_CreateBezierLine(); 00042 DEBRUSH_API IdeLine * IdeLine_CreateArcLine(); 00043 DEBRUSH_API IdeLine * IdeLine_CreateGroupLine(); 00044 DEBRUSH_API deBoolean IdeLine_GroupLineAdd(IdeLine * Group, IdeLine * ToAdd); 00045 DEBRUSH_API long IdeLine_GroupLineRemoveLast(IdeLine * Group); 00046 DEBRUSH_API IdeSplinePatch* IdeLine_CreateSplinePatch(); 00047 00048 //class IdeLine 00049 DE3D_INTERFACE_(IdeLine) 00050 { 00051 protected: 00052 virtual ~IdeLine() {} 00053 00054 public: 00055 virtual long Release() = 0; 00056 00057 // feed it a float between 0.0 and 1.0 00058 virtual void GetPointOnLine(deDouble Fraction, deVec3d & point) = 0; 00059 virtual void GetTangentAtPoint(deDouble Fraction, deVec3d & point) = 0; 00060 // GetLength only useful for combined lines, but very useful there 00061 virtual long GetLength() = 0; 00062 00063 virtual long GetNumCVs() = 0; 00064 virtual void GetCVList(deVec3d buffer[]) = 0; 00065 virtual deVec3d GetCV(long num) = 0; 00066 virtual void SetCV(long num, deVec3d & CV) = 0; 00067 virtual void SetCVList(long num, deVec3d CVList[]) = 0; 00068 virtual void AddCV(deVec3d & point) = 0; 00069 00070 virtual IdeLine * Copy() = 0; 00071 }; 00072 00073 //class IdeSplinePatch 00074 DE3D_INTERFACE_(IdeSplinePatch) 00075 { 00076 protected: 00077 ~IdeSplinePatch() {} 00078 00079 public: 00080 virtual long Release() = 0; 00081 00082 virtual deBoolean SetNumControls(long Num) = 0; 00083 virtual deBoolean SetNumControlSamples(long Num) = 0; 00084 virtual deBoolean SetNumInterSamples(long Num) = 0; 00085 virtual long GetNumControls() const = 0; 00086 virtual long GetNumControlSamples() const = 0; 00087 virtual long GetNumInterSamples() const = 0; 00088 00089 virtual deBoolean SetControl(long index, IdeLine * control) = 0; 00090 virtual deBoolean SetAllControls(long Num, IdeLine * controls[]) = 0; 00091 00092 virtual long GetNumVertices() = 0; 00093 virtual long GetNumIndices() = 0; 00094 virtual deVec3d * GetVertices() = 0; 00095 virtual unsigned short * GetIndices() = 0; 00096 }; 00097 00098 #endif 00099
1.3-rc3